'use strict';
const axios = require('axios');

const BASE_URL = process.env.YUYD_CLI_BASE_URL
  ? process.env.YUYD_CLI_BASE_URL
  : 'http://www.yukefei.com:7001';
console.log(BASE_URL);
const request = axios.create({
  baseURL: BASE_URL,
  timeout: 5000
});

request.interceptors.response.use(
  (response) => {
    return response.data;
  },
  (error) => Promise.reject(error)
);
module.exports = request;
